#include "stdafx.h"
#include "gtest/gtest.h"
#include <iostream>
#include <string>

void Foo()
{
	int *pInt = 0;
	*pInt = 42;
}

TEST(FooDeathTeat, Demo)
{
	EXPECT_DEATH(Foo(), "");
}

TEST(ExitDeathTest, Demo)
{
	EXPECT_EXIT(_exit(1), testing::ExitedWithCode(1), "");
}